package com.quwan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 定时任务锁表
 * </p>
 *
 * @author quwan
 * @since 2021-11-24
 */
@TableName("t_job_lock")
@ApiModel(value = "JobLock对象", description = "定时任务锁表")
public class JobLock implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("类型：1-推广数据统计，2-留存报表数据统计")
    private Integer type;

    @ApiModelProperty("锁，每次加一")
    private Long version;

    @ApiModelProperty("最后修改时间")
    private LocalDateTime lastModifyTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }
    public LocalDateTime getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(LocalDateTime lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    @Override
    public String toString() {
        return "JobLock{" +
            "id=" + id +
            ", type=" + type +
            ", version=" + version +
            ", lastModifyTime=" + lastModifyTime +
        "}";
    }
}
